<!--
 * @Author: H.
 * @Date: 2021-11-01 19:16:38
 * @LastEditTime: 2021-11-24 17:11:36
 * @Description: 
-->
<template>
  <div>
    <h1>Pager 示例</h1>
    <Demo :component="PagerDemo1" />
    <h2>Pager Attributes</h2>
    <Table :dataSource="dataSource" :columns="columns" />
  </div>
</template>

<script lang="ts">
import Table from '../lib/table/Table.vue'
import Demo from './Demo/index.vue'
import PagerDemo1 from './Demo/PagerDemo1.vue'
export default {
  setup(props) {
    const dataSource = [
      {
        id: 1,
        params: 'totalPage',
        illustrate: '总页数',
        type: 'number',
        optional: '-',
        defaults: '-',
      },
      {
        id: 2,
        params: 'currentPage',
        illustrate: '当前页',
        type: 'number',
        optional: '-',
        defaults: '-',
      },
      {
        id: 3,
        params: 'hideIfOnePage',
        illustrate: '只有一页时是否隐藏',
        type: 'boolean',
        optional: '-',
        defaults: 'true',
      },
    ]
    const columns = [
      { title: '参数', prop: 'params', width: '300' },
      { title: '说明', prop: 'illustrate', width: '300' },
      { title: '类型', prop: 'type', width: '100' },
      { title: '可选值', prop: 'optional', width: '100' },
      { title: '默认值', prop: 'defaults' },
    ]
    return { PagerDemo1, columns, dataSource }
  },
  components: {
    Demo,
    Table,
  },
}
</script>

<style></style>
